<?php
/**
 * Created by PhpStorm.
 * User: geyouwen
 * Date: 17/2/8
 * Time: 下午2:25
 */

namespace App\Http\Controllers\Member;


use App\Http\Controllers\Controller;
use App\Model\Bll\MemberBll;
use Illuminate\Http\Request;

class MemberController extends Controller
{
    private $request;

    public function __construct(Request $request)
    {
        $this->request = $request;
        parent::__construct($this->request);
    }

    /**
     * 用户注册
     *
     */
    public function register()
    {
        $result = false;
        switch($this->request->version)
        {
            case '1.0':
                echo $this->request->lang;
                break;
            default:
               $member_bll = new MemberBll();
               $result =  $member_bll->register($this->request);
               if($result) return $this->respond(200, $result);
                return $this->respond(10001);

//                if($result == 1) return $this->respond(['status' => 200, 'msg' =>'success']);
//
                break;
        }

    }

}